﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Xml.Serialization;

namespace MvcTasks.Models
{
    public class RandomTask : IEquatable<RandomTask>, IReferenceTypeMapping
    {
        public RandomTask()
        {
            
        }
        public int ID { get; set; }
        public string Title { get; set; }

        //[Display(Name = "Cut Off Date")]
        //[DataType(DataType.Date)]
        //[DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true)]
       // public DateTime ReleaseDate { get; set; }
        public string Genre { get; set; }
       //[XmlIgnore]
       // public Genre Genres { get; set; }


        [DataType(DataType.MultilineText)]
        [UIHint("DisplayDescription")]
        [Display(Name = "A description", Order = -9,
        Prompt = "Enter  the tasks to do", Description = "Emp Description")]

        public string Description { get; set; }
        public int Priority { get; set; }
        public decimal PercentageDone {get; set;}
        [DataType(DataType.Url)]
        public string Url { get; set; }

        public bool Equals(RandomTask other)
        {
            if (other == null) return false;
            return other.ID == ID;
        }
    }
}